User Contributed MET/CAL PROCEDURE ============================================================================= INSTRUMENT: Utilities DATE: 26-Apr-93 AUTHOR: User Contributed REVISION: A ADJUSTMENT THRESHOLD: 70% NUMBER OF TESTS: 1 NUMBER OF LINES: 109 ============================================================================= STEP FSC RANGE NOMINAL TOLERANCE MOD1 MOD2 3 4 CON #**************************************************************************** #** Title: UTILITIES PROCEDURE ** #** Purpose: This procedure contains some useful subroutines that can ** #** be called from other procedures. To call one of these ** #** routines, you must load the routine number into the MEM ** #** register (as well as any other pararmeters/registers as ** #** required by the procedure called), and then execute a ** #** CALL UTILITIES. The caller is responsible for saving the ** #** previous values of MEM and any other register used before ** #** making the CALL. ** #** ** #** To add a routine, insert its code before the End of UTILITIES ** #** comment, and add the MATH MEM1=MEM1-1 and JMPZ x.xxx lines for the ** #** new routine, making sure x.xxx reflects the line number of the start ** #** of the new routine. The new routine should start with a MEME (to ** #** restore the exchange in 1.001) and should end with a JMP, which will ** #** jump to the end of the UTILITIES procedure. ** #** ** #**************************************************************************** 1.001 MEME # Test for Routine Number 1.002 MATH MEM1=MEM1-1 1.003 JMPZ 1.010 1.004 MATH MEM1=MEM1-1 1.005 JMPZ 1.018 1.006 MATH MEM1=MEM1-1 1.007 JMPZ 1.025 # Invalid Routine Number handler 1.008 DISP Invalid Routine Number in UTILITIES procedure. 1.008 DISP MEM1=[MEM1] 1.009 JMP #_____________________________________________________________________________ # Routine Number 1: Long Delay # Purpose: To delay longer than 32.767 seconds. # MEM1 contains the number of seconds to wait (0 to 1E+307) 1.010 MEME 1.011 JMP 1.015 1.012 HEAD [MEM2] ([MEM1]) 1.013 IEEE [D1000] 1.014 MATH MEM1=MEM1-1 1.015 JMPT 1.012 1.016 MEM2 = 1.017 JMP #_____________________________________________________________________________ # Routine Number 2: Wait for ESE 1 # Purpose: To wait for 2001 to finish a cal step by asserting bit 5 of the # serial poll byte. 1.018 MEME 1.019 IEEE [D500][SPL 32] 1.020 MEME 1.021 MATH MEM1=MEM1-32 1.022 JMPZ 1.024 0.1U 1.023 JMP 1.019 1.024 JMP #_____________________________________________________________________________ # Routine Number 3: Check Front/Rear switch on Keithley 2001 at default IEEE # address. # Purpose: To verify that the front/rear switch is in the desired position. # Call this routine with M[1]=0 if you want the front/rear switch to # be in the REAR setting, or M[1]=1 if you want the FRONT inputs to # be selected. If the switch is currently not set to the desired # setting, a message will be displayed asking the user to set the # switch to the correct position. 1.025 MEME 1.026 MATH MEM1=M[1] 1.027 JMPZ 1.032 1.028 MATH MEM1=M[1]-1 1.029 JMPZ 1.034 1.030 DISP An value other than 0 or 1 has been specified for the 1.030 DISP desired setting of the FRONT/REAR switch. Please call 1.030 DISP Manufacturing Engineering to determine what position it 1.030 DISP should be set to.[7] 1.031 JMP 1.032 MEM2 =[27][91]5mREAR[27][91]m 1.033 JMP 1.036 1.034 MEM2 =[27][91]5mFRONT[27][91]m 1.035 JMP 1.036 # Loop until switch is set to desired state 1.036 IEEE :SYST:FRSW?[D500][I] 1.037 MATH MEM1=M[1]-MEM 1.038 JMPZ 1.041 1.039 HEAD Please select the [MEM2] inputs on the 2001. 1.040 JMP 1.036 1.041 HEAD [7]Thanks![D1000] # End of UTILITIES 1.042 END